/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package db.interfaces;

import core.Book;
import core.Course;
import core.Program;
import core.School;
import core.User;
import java.util.Collection;

/**
 *
 * @author Anton
 */
public interface CourseDAO
{    
    Course getCourseById(long id);

    Collection<Course> searchForCoursesByName(String beginsWith);
    Collection<Course> searchForCoursesByCourseId(String beginsWith);
    Collection<Course> searchForCoursesByParameters(String beginsWith, String fieldName, boolean asc);
    Collection<Course> getCoursesByName(String name);
    Collection<Course> getCoursesByCourseId(String courseId);
    Collection<Course> getAllCourses();

    Collection<Course> getAllCoursesInProgram(Program program);
    Collection<Course> getAllCoursesInSchool(School school);
    Collection<Course> getAllCoursesInUser(User user);

    boolean addBookToCourse(Course course, Book book);
    boolean deleteBookFromCourse(Course course, Book book);

    boolean courseIsBound(Course course);
    boolean containsCourse(Course course);
    boolean addCourse(Course course);
    boolean editCourse(Course course);
    boolean deleteCourse(Course course);
}
